package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IMoreMoreGoodInfoActivityModel;
import com.wgts.wgts.mvp.model.imp.MoreMoreGoodInfoActivityModel;
import com.wgts.wgts.mvp.presenter.IMoreMoreGoodInfoActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.MoreMoreGoodInfoActivityPresenter;
import com.wgts.wgts.mvp.view.IMoreMoreGoodInfoActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

@Module
public class MoreMoreGoodInfoActivityModule {

    private IMoreMoreGoodInfoActivityView view;

    public MoreMoreGoodInfoActivityModule(IMoreMoreGoodInfoActivityView view) {
        this.view = view;
    }

    @Provides
    @ActivityScope
    public IMoreMoreGoodInfoActivityView provideView(){
        return view;
    }

    @Provides
    @ActivityScope
    public IMoreMoreGoodInfoActivityModel provideModel(NetService netService){
        return new MoreMoreGoodInfoActivityModel(netService);
    }

    @Provides
    @ActivityScope
    public IMoreMoreGoodInfoActivityPresenter providePresenter(IMoreMoreGoodInfoActivityView view, IMoreMoreGoodInfoActivityModel model){
        return new MoreMoreGoodInfoActivityPresenter(model, view);
    }
}
